import type { BasePageReqParam, EnabledStatus } from './common'

export enum BatchType {
  DIGITAL = 'digital',
  PAPER = 'paper',
}

export interface BatchRes {
  /**
   * 总价
   */
  allAmount: string
  /**
   * 纸质票paper 数字票digital
   */
  batchType: BatchType
  /**
   * 导游公司id
   */
  companyId: string
  /**
   * 公司名
   */
  companyName: string
  /**
   * 创建时间
   */
  createDate: string
  /**
   * 逻辑删除标识
   */
  deleted: string
  /**
   * id
   */
  id: string
  /**
   * 购买时间
   */
  orderDate: string
  /**
   * 剩余票量
   */
  remainingCount: string
  /**
   * 购买数量
   */
  ticketCount: string
  /**
   * 总数量
   */
  ticketCountAll: string
  /**
   * 赠送数量
   */
  ticketCountGift: string
  /**
   * id
   */
  ticketId: string
  /**
   * 票名
   */
  ticketName: string
  /**
   * 单价
   */
  ticketPrice: string
  /**
   * 更新时间
   */
  updateDate: string
}

export interface BatchReqData {
  companyId: string
  ticketId: string
  ticketCount: number
  ticketCountGift: number
  batchType: BatchType
}

export interface BatchTicketCheckRes {
  id: string
  batchOrderId: string
  guideId: string
  guideName: string
  companyId: string
  companyName: string
  ticketId: string
  ticketName: string
  ticketPrice: string
  contentId: string
  contentName: string
  createDate: string
  updateDate: string
  deleted: string
  enabled: EnabledStatus
}

export interface BatchTicketCheckPageReqParams extends BasePageReqParam {
  batchOrderId?: string
  companyName?: string
  guideName?: string
  companyId?: string
}

export enum BatchTicketStatus {
  USED = 'used',
  UNUSED = 'unused',
}

export interface BatchTicketRes {
  id: string
  contentId: string
  contentName: string
  ticketId: string
  ticketName: string
  ticketPrice: string
  ticketStatus: BatchTicketStatus
  enabled: EnabledStatus
  createDate: string
  updateDate: string
  deleted: string
}

export interface BatchTicketPageReqParams extends BasePageReqParam {
  id?: string // 票码
  batchOrderId?: string
  companyName?: string
  ticketStatus?: BatchTicketStatus | ''
}
